package qldc.pm.tienan.model.impl;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.DateUtil;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.util.PortalUtil;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAn;
import qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAnModel;

import java.io.Serializable;

import java.sql.Types;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * The base model implementation for the PhieuThongTinVeNguoiCoTienAn service. Represents a row in the &quot;TA_PhieuThongTinVeNguoiCoTienAn&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAnModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link PhieuThongTinVeNguoiCoTienAnImpl}.
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see PhieuThongTinVeNguoiCoTienAnImpl
 * @see qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAn
 * @see qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAnModel
 * @generated
 */
public class PhieuThongTinVeNguoiCoTienAnModelImpl extends BaseModelImpl<PhieuThongTinVeNguoiCoTienAn>
    implements PhieuThongTinVeNguoiCoTienAnModel {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. All methods that expect a phieu thong tin ve nguoi co tien an model instance should use the {@link qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAn} interface instead.
     */
    public static final String TABLE_NAME = "TA_PhieuThongTinVeNguoiCoTienAn";
    public static final Object[][] TABLE_COLUMNS = {
            { "phieuThongTinVeNguoiCoTienAnId", Types.BIGINT },
            { "userId", Types.BIGINT },
            { "userName", Types.VARCHAR },
            { "createDate", Types.TIMESTAMP },
            { "modifiedDate", Types.TIMESTAMP },
            { "tienAnId", Types.BIGINT },
            { "maSoHoSoTienAnTuToaAn", Types.VARCHAR },
            { "nguoiTrichLuc", Types.VARCHAR },
            { "thamPhan", Types.VARCHAR },
            { "soDinhDanhCaNhan", Types.VARCHAR },
            { "chuThich", Types.VARCHAR },
            { "noiTamTruDiaChi", Types.VARCHAR },
            { "noiTamTruTinhId", Types.BIGINT },
            { "noiTamTruQuanHuyenId", Types.BIGINT },
            { "noiTamTruPhuongXaId", Types.BIGINT },
            { "noiThuongTruDiaChi", Types.VARCHAR },
            { "noiThuongTruTinhId", Types.BIGINT },
            { "noiThuongTruQuanHuyenId", Types.BIGINT },
            { "noiThuongTruPhuongXaId", Types.BIGINT },
            { "hoTenVoHoacChong", Types.VARCHAR },
            { "hoTenCha", Types.VARCHAR },
            { "hoTenMe", Types.VARCHAR }
        };
    public static final String TABLE_SQL_CREATE = "create table TA_PhieuThongTinVeNguoiCoTienAn (phieuThongTinVeNguoiCoTienAnId LONG not null primary key,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,tienAnId LONG,maSoHoSoTienAnTuToaAn VARCHAR(75) null,nguoiTrichLuc VARCHAR(75) null,thamPhan VARCHAR(75) null,soDinhDanhCaNhan VARCHAR(75) null,chuThich VARCHAR(75) null,noiTamTruDiaChi VARCHAR(75) null,noiTamTruTinhId LONG,noiTamTruQuanHuyenId LONG,noiTamTruPhuongXaId LONG,noiThuongTruDiaChi VARCHAR(75) null,noiThuongTruTinhId LONG,noiThuongTruQuanHuyenId LONG,noiThuongTruPhuongXaId LONG,hoTenVoHoacChong VARCHAR(75) null,hoTenCha VARCHAR(75) null,hoTenMe VARCHAR(75) null)";
    public static final String TABLE_SQL_DROP = "drop table TA_PhieuThongTinVeNguoiCoTienAn";
    public static final String ORDER_BY_JPQL = " ORDER BY phieuThongTinVeNguoiCoTienAn.createDate DESC";
    public static final String ORDER_BY_SQL = " ORDER BY TA_PhieuThongTinVeNguoiCoTienAn.createDate DESC";
    public static final String DATA_SOURCE = "liferayDataSource";
    public static final String SESSION_FACTORY = "liferaySessionFactory";
    public static final String TX_MANAGER = "liferayTransactionManager";
    public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.entity.cache.enabled.qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAn"),
            true);
    public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.finder.cache.enabled.qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAn"),
            true);
    public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.column.bitmask.enabled.qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAn"),
            true);
    public static long MASOHOSOTIENANTUTOAAN_COLUMN_BITMASK = 1L;
    public static long NOITHUONGTRUDIACHI_COLUMN_BITMASK = 2L;
    public static long NOITHUONGTRUPHUONGXAID_COLUMN_BITMASK = 4L;
    public static long NOITHUONGTRUQUANHUYENID_COLUMN_BITMASK = 8L;
    public static long NOITHUONGTRUTINHID_COLUMN_BITMASK = 16L;
    public static long SODINHDANHCANHAN_COLUMN_BITMASK = 32L;
    public static long TIENANID_COLUMN_BITMASK = 64L;
    public static long CREATEDATE_COLUMN_BITMASK = 128L;
    public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
                "lock.expiration.time.qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAn"));
    private static ClassLoader _classLoader = PhieuThongTinVeNguoiCoTienAn.class.getClassLoader();
    private static Class<?>[] _escapedModelInterfaces = new Class[] {
            PhieuThongTinVeNguoiCoTienAn.class
        };
    private long _phieuThongTinVeNguoiCoTienAnId;
    private long _userId;
    private String _userUuid;
    private String _userName;
    private Date _createDate;
    private Date _modifiedDate;
    private long _tienAnId;
    private long _originalTienAnId;
    private boolean _setOriginalTienAnId;
    private String _maSoHoSoTienAnTuToaAn;
    private String _originalMaSoHoSoTienAnTuToaAn;
    private String _nguoiTrichLuc;
    private String _thamPhan;
    private String _soDinhDanhCaNhan;
    private String _originalSoDinhDanhCaNhan;
    private String _chuThich;
    private String _noiTamTruDiaChi;
    private long _noiTamTruTinhId;
    private long _noiTamTruQuanHuyenId;
    private long _noiTamTruPhuongXaId;
    private String _noiThuongTruDiaChi;
    private String _originalNoiThuongTruDiaChi;
    private long _noiThuongTruTinhId;
    private long _originalNoiThuongTruTinhId;
    private boolean _setOriginalNoiThuongTruTinhId;
    private long _noiThuongTruQuanHuyenId;
    private long _originalNoiThuongTruQuanHuyenId;
    private boolean _setOriginalNoiThuongTruQuanHuyenId;
    private long _noiThuongTruPhuongXaId;
    private long _originalNoiThuongTruPhuongXaId;
    private boolean _setOriginalNoiThuongTruPhuongXaId;
    private String _hoTenVoHoacChong;
    private String _hoTenCha;
    private String _hoTenMe;
    private long _columnBitmask;
    private PhieuThongTinVeNguoiCoTienAn _escapedModel;

    public PhieuThongTinVeNguoiCoTienAnModelImpl() {
    }

    @Override
    public long getPrimaryKey() {
        return _phieuThongTinVeNguoiCoTienAnId;
    }

    @Override
    public void setPrimaryKey(long primaryKey) {
        setPhieuThongTinVeNguoiCoTienAnId(primaryKey);
    }

    @Override
    public Serializable getPrimaryKeyObj() {
        return _phieuThongTinVeNguoiCoTienAnId;
    }

    @Override
    public void setPrimaryKeyObj(Serializable primaryKeyObj) {
        setPrimaryKey(((Long) primaryKeyObj).longValue());
    }

    @Override
    public Class<?> getModelClass() {
        return PhieuThongTinVeNguoiCoTienAn.class;
    }

    @Override
    public String getModelClassName() {
        return PhieuThongTinVeNguoiCoTienAn.class.getName();
    }

    @Override
    public Map<String, Object> getModelAttributes() {
        Map<String, Object> attributes = new HashMap<String, Object>();

        attributes.put("phieuThongTinVeNguoiCoTienAnId",
            getPhieuThongTinVeNguoiCoTienAnId());
        attributes.put("userId", getUserId());
        attributes.put("userName", getUserName());
        attributes.put("createDate", getCreateDate());
        attributes.put("modifiedDate", getModifiedDate());
        attributes.put("tienAnId", getTienAnId());
        attributes.put("maSoHoSoTienAnTuToaAn", getMaSoHoSoTienAnTuToaAn());
        attributes.put("nguoiTrichLuc", getNguoiTrichLuc());
        attributes.put("thamPhan", getThamPhan());
        attributes.put("soDinhDanhCaNhan", getSoDinhDanhCaNhan());
        attributes.put("chuThich", getChuThich());
        attributes.put("noiTamTruDiaChi", getNoiTamTruDiaChi());
        attributes.put("noiTamTruTinhId", getNoiTamTruTinhId());
        attributes.put("noiTamTruQuanHuyenId", getNoiTamTruQuanHuyenId());
        attributes.put("noiTamTruPhuongXaId", getNoiTamTruPhuongXaId());
        attributes.put("noiThuongTruDiaChi", getNoiThuongTruDiaChi());
        attributes.put("noiThuongTruTinhId", getNoiThuongTruTinhId());
        attributes.put("noiThuongTruQuanHuyenId", getNoiThuongTruQuanHuyenId());
        attributes.put("noiThuongTruPhuongXaId", getNoiThuongTruPhuongXaId());
        attributes.put("hoTenVoHoacChong", getHoTenVoHoacChong());
        attributes.put("hoTenCha", getHoTenCha());
        attributes.put("hoTenMe", getHoTenMe());

        return attributes;
    }

    @Override
    public void setModelAttributes(Map<String, Object> attributes) {
        Long phieuThongTinVeNguoiCoTienAnId = (Long) attributes.get(
                "phieuThongTinVeNguoiCoTienAnId");

        if (phieuThongTinVeNguoiCoTienAnId != null) {
            setPhieuThongTinVeNguoiCoTienAnId(phieuThongTinVeNguoiCoTienAnId);
        }

        Long userId = (Long) attributes.get("userId");

        if (userId != null) {
            setUserId(userId);
        }

        String userName = (String) attributes.get("userName");

        if (userName != null) {
            setUserName(userName);
        }

        Date createDate = (Date) attributes.get("createDate");

        if (createDate != null) {
            setCreateDate(createDate);
        }

        Date modifiedDate = (Date) attributes.get("modifiedDate");

        if (modifiedDate != null) {
            setModifiedDate(modifiedDate);
        }

        Long tienAnId = (Long) attributes.get("tienAnId");

        if (tienAnId != null) {
            setTienAnId(tienAnId);
        }

        String maSoHoSoTienAnTuToaAn = (String) attributes.get(
                "maSoHoSoTienAnTuToaAn");

        if (maSoHoSoTienAnTuToaAn != null) {
            setMaSoHoSoTienAnTuToaAn(maSoHoSoTienAnTuToaAn);
        }

        String nguoiTrichLuc = (String) attributes.get("nguoiTrichLuc");

        if (nguoiTrichLuc != null) {
            setNguoiTrichLuc(nguoiTrichLuc);
        }

        String thamPhan = (String) attributes.get("thamPhan");

        if (thamPhan != null) {
            setThamPhan(thamPhan);
        }

        String soDinhDanhCaNhan = (String) attributes.get("soDinhDanhCaNhan");

        if (soDinhDanhCaNhan != null) {
            setSoDinhDanhCaNhan(soDinhDanhCaNhan);
        }

        String chuThich = (String) attributes.get("chuThich");

        if (chuThich != null) {
            setChuThich(chuThich);
        }

        String noiTamTruDiaChi = (String) attributes.get("noiTamTruDiaChi");

        if (noiTamTruDiaChi != null) {
            setNoiTamTruDiaChi(noiTamTruDiaChi);
        }

        Long noiTamTruTinhId = (Long) attributes.get("noiTamTruTinhId");

        if (noiTamTruTinhId != null) {
            setNoiTamTruTinhId(noiTamTruTinhId);
        }

        Long noiTamTruQuanHuyenId = (Long) attributes.get(
                "noiTamTruQuanHuyenId");

        if (noiTamTruQuanHuyenId != null) {
            setNoiTamTruQuanHuyenId(noiTamTruQuanHuyenId);
        }

        Long noiTamTruPhuongXaId = (Long) attributes.get("noiTamTruPhuongXaId");

        if (noiTamTruPhuongXaId != null) {
            setNoiTamTruPhuongXaId(noiTamTruPhuongXaId);
        }

        String noiThuongTruDiaChi = (String) attributes.get(
                "noiThuongTruDiaChi");

        if (noiThuongTruDiaChi != null) {
            setNoiThuongTruDiaChi(noiThuongTruDiaChi);
        }

        Long noiThuongTruTinhId = (Long) attributes.get("noiThuongTruTinhId");

        if (noiThuongTruTinhId != null) {
            setNoiThuongTruTinhId(noiThuongTruTinhId);
        }

        Long noiThuongTruQuanHuyenId = (Long) attributes.get(
                "noiThuongTruQuanHuyenId");

        if (noiThuongTruQuanHuyenId != null) {
            setNoiThuongTruQuanHuyenId(noiThuongTruQuanHuyenId);
        }

        Long noiThuongTruPhuongXaId = (Long) attributes.get(
                "noiThuongTruPhuongXaId");

        if (noiThuongTruPhuongXaId != null) {
            setNoiThuongTruPhuongXaId(noiThuongTruPhuongXaId);
        }

        String hoTenVoHoacChong = (String) attributes.get("hoTenVoHoacChong");

        if (hoTenVoHoacChong != null) {
            setHoTenVoHoacChong(hoTenVoHoacChong);
        }

        String hoTenCha = (String) attributes.get("hoTenCha");

        if (hoTenCha != null) {
            setHoTenCha(hoTenCha);
        }

        String hoTenMe = (String) attributes.get("hoTenMe");

        if (hoTenMe != null) {
            setHoTenMe(hoTenMe);
        }
    }

    @Override
    public long getPhieuThongTinVeNguoiCoTienAnId() {
        return _phieuThongTinVeNguoiCoTienAnId;
    }

    @Override
    public void setPhieuThongTinVeNguoiCoTienAnId(
        long phieuThongTinVeNguoiCoTienAnId) {
        _phieuThongTinVeNguoiCoTienAnId = phieuThongTinVeNguoiCoTienAnId;
    }

    @Override
    public long getUserId() {
        return _userId;
    }

    @Override
    public void setUserId(long userId) {
        _userId = userId;
    }

    @Override
    public String getUserUuid() throws SystemException {
        return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
    }

    @Override
    public void setUserUuid(String userUuid) {
        _userUuid = userUuid;
    }

    @Override
    public String getUserName() {
        if (_userName == null) {
            return StringPool.BLANK;
        } else {
            return _userName;
        }
    }

    @Override
    public void setUserName(String userName) {
        _userName = userName;
    }

    @Override
    public Date getCreateDate() {
        return _createDate;
    }

    @Override
    public void setCreateDate(Date createDate) {
        _columnBitmask = -1L;

        _createDate = createDate;
    }

    @Override
    public Date getModifiedDate() {
        return _modifiedDate;
    }

    @Override
    public void setModifiedDate(Date modifiedDate) {
        _modifiedDate = modifiedDate;
    }

    @Override
    public long getTienAnId() {
        return _tienAnId;
    }

    @Override
    public void setTienAnId(long tienAnId) {
        _columnBitmask |= TIENANID_COLUMN_BITMASK;

        if (!_setOriginalTienAnId) {
            _setOriginalTienAnId = true;

            _originalTienAnId = _tienAnId;
        }

        _tienAnId = tienAnId;
    }

    public long getOriginalTienAnId() {
        return _originalTienAnId;
    }

    @Override
    public String getMaSoHoSoTienAnTuToaAn() {
        if (_maSoHoSoTienAnTuToaAn == null) {
            return StringPool.BLANK;
        } else {
            return _maSoHoSoTienAnTuToaAn;
        }
    }

    @Override
    public void setMaSoHoSoTienAnTuToaAn(String maSoHoSoTienAnTuToaAn) {
        _columnBitmask |= MASOHOSOTIENANTUTOAAN_COLUMN_BITMASK;

        if (_originalMaSoHoSoTienAnTuToaAn == null) {
            _originalMaSoHoSoTienAnTuToaAn = _maSoHoSoTienAnTuToaAn;
        }

        _maSoHoSoTienAnTuToaAn = maSoHoSoTienAnTuToaAn;
    }

    public String getOriginalMaSoHoSoTienAnTuToaAn() {
        return GetterUtil.getString(_originalMaSoHoSoTienAnTuToaAn);
    }

    @Override
    public String getNguoiTrichLuc() {
        if (_nguoiTrichLuc == null) {
            return StringPool.BLANK;
        } else {
            return _nguoiTrichLuc;
        }
    }

    @Override
    public void setNguoiTrichLuc(String nguoiTrichLuc) {
        _nguoiTrichLuc = nguoiTrichLuc;
    }

    @Override
    public String getThamPhan() {
        if (_thamPhan == null) {
            return StringPool.BLANK;
        } else {
            return _thamPhan;
        }
    }

    @Override
    public void setThamPhan(String thamPhan) {
        _thamPhan = thamPhan;
    }

    @Override
    public String getSoDinhDanhCaNhan() {
        if (_soDinhDanhCaNhan == null) {
            return StringPool.BLANK;
        } else {
            return _soDinhDanhCaNhan;
        }
    }

    @Override
    public void setSoDinhDanhCaNhan(String soDinhDanhCaNhan) {
        _columnBitmask |= SODINHDANHCANHAN_COLUMN_BITMASK;

        if (_originalSoDinhDanhCaNhan == null) {
            _originalSoDinhDanhCaNhan = _soDinhDanhCaNhan;
        }

        _soDinhDanhCaNhan = soDinhDanhCaNhan;
    }

    public String getOriginalSoDinhDanhCaNhan() {
        return GetterUtil.getString(_originalSoDinhDanhCaNhan);
    }

    @Override
    public String getChuThich() {
        if (_chuThich == null) {
            return StringPool.BLANK;
        } else {
            return _chuThich;
        }
    }

    @Override
    public void setChuThich(String chuThich) {
        _chuThich = chuThich;
    }

    @Override
    public String getNoiTamTruDiaChi() {
        if (_noiTamTruDiaChi == null) {
            return StringPool.BLANK;
        } else {
            return _noiTamTruDiaChi;
        }
    }

    @Override
    public void setNoiTamTruDiaChi(String noiTamTruDiaChi) {
        _noiTamTruDiaChi = noiTamTruDiaChi;
    }

    @Override
    public long getNoiTamTruTinhId() {
        return _noiTamTruTinhId;
    }

    @Override
    public void setNoiTamTruTinhId(long noiTamTruTinhId) {
        _noiTamTruTinhId = noiTamTruTinhId;
    }

    @Override
    public long getNoiTamTruQuanHuyenId() {
        return _noiTamTruQuanHuyenId;
    }

    @Override
    public void setNoiTamTruQuanHuyenId(long noiTamTruQuanHuyenId) {
        _noiTamTruQuanHuyenId = noiTamTruQuanHuyenId;
    }

    @Override
    public long getNoiTamTruPhuongXaId() {
        return _noiTamTruPhuongXaId;
    }

    @Override
    public void setNoiTamTruPhuongXaId(long noiTamTruPhuongXaId) {
        _noiTamTruPhuongXaId = noiTamTruPhuongXaId;
    }

    @Override
    public String getNoiThuongTruDiaChi() {
        if (_noiThuongTruDiaChi == null) {
            return StringPool.BLANK;
        } else {
            return _noiThuongTruDiaChi;
        }
    }

    @Override
    public void setNoiThuongTruDiaChi(String noiThuongTruDiaChi) {
        _columnBitmask |= NOITHUONGTRUDIACHI_COLUMN_BITMASK;

        if (_originalNoiThuongTruDiaChi == null) {
            _originalNoiThuongTruDiaChi = _noiThuongTruDiaChi;
        }

        _noiThuongTruDiaChi = noiThuongTruDiaChi;
    }

    public String getOriginalNoiThuongTruDiaChi() {
        return GetterUtil.getString(_originalNoiThuongTruDiaChi);
    }

    @Override
    public long getNoiThuongTruTinhId() {
        return _noiThuongTruTinhId;
    }

    @Override
    public void setNoiThuongTruTinhId(long noiThuongTruTinhId) {
        _columnBitmask |= NOITHUONGTRUTINHID_COLUMN_BITMASK;

        if (!_setOriginalNoiThuongTruTinhId) {
            _setOriginalNoiThuongTruTinhId = true;

            _originalNoiThuongTruTinhId = _noiThuongTruTinhId;
        }

        _noiThuongTruTinhId = noiThuongTruTinhId;
    }

    public long getOriginalNoiThuongTruTinhId() {
        return _originalNoiThuongTruTinhId;
    }

    @Override
    public long getNoiThuongTruQuanHuyenId() {
        return _noiThuongTruQuanHuyenId;
    }

    @Override
    public void setNoiThuongTruQuanHuyenId(long noiThuongTruQuanHuyenId) {
        _columnBitmask |= NOITHUONGTRUQUANHUYENID_COLUMN_BITMASK;

        if (!_setOriginalNoiThuongTruQuanHuyenId) {
            _setOriginalNoiThuongTruQuanHuyenId = true;

            _originalNoiThuongTruQuanHuyenId = _noiThuongTruQuanHuyenId;
        }

        _noiThuongTruQuanHuyenId = noiThuongTruQuanHuyenId;
    }

    public long getOriginalNoiThuongTruQuanHuyenId() {
        return _originalNoiThuongTruQuanHuyenId;
    }

    @Override
    public long getNoiThuongTruPhuongXaId() {
        return _noiThuongTruPhuongXaId;
    }

    @Override
    public void setNoiThuongTruPhuongXaId(long noiThuongTruPhuongXaId) {
        _columnBitmask |= NOITHUONGTRUPHUONGXAID_COLUMN_BITMASK;

        if (!_setOriginalNoiThuongTruPhuongXaId) {
            _setOriginalNoiThuongTruPhuongXaId = true;

            _originalNoiThuongTruPhuongXaId = _noiThuongTruPhuongXaId;
        }

        _noiThuongTruPhuongXaId = noiThuongTruPhuongXaId;
    }

    public long getOriginalNoiThuongTruPhuongXaId() {
        return _originalNoiThuongTruPhuongXaId;
    }

    @Override
    public String getHoTenVoHoacChong() {
        if (_hoTenVoHoacChong == null) {
            return StringPool.BLANK;
        } else {
            return _hoTenVoHoacChong;
        }
    }

    @Override
    public void setHoTenVoHoacChong(String hoTenVoHoacChong) {
        _hoTenVoHoacChong = hoTenVoHoacChong;
    }

    @Override
    public String getHoTenCha() {
        if (_hoTenCha == null) {
            return StringPool.BLANK;
        } else {
            return _hoTenCha;
        }
    }

    @Override
    public void setHoTenCha(String hoTenCha) {
        _hoTenCha = hoTenCha;
    }

    @Override
    public String getHoTenMe() {
        if (_hoTenMe == null) {
            return StringPool.BLANK;
        } else {
            return _hoTenMe;
        }
    }

    @Override
    public void setHoTenMe(String hoTenMe) {
        _hoTenMe = hoTenMe;
    }

    public long getColumnBitmask() {
        return _columnBitmask;
    }

    @Override
    public ExpandoBridge getExpandoBridge() {
        return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
            PhieuThongTinVeNguoiCoTienAn.class.getName(), getPrimaryKey());
    }

    @Override
    public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
        ExpandoBridge expandoBridge = getExpandoBridge();

        expandoBridge.setAttributes(serviceContext);
    }

    @Override
    public PhieuThongTinVeNguoiCoTienAn toEscapedModel() {
        if (_escapedModel == null) {
            _escapedModel = (PhieuThongTinVeNguoiCoTienAn) ProxyUtil.newProxyInstance(_classLoader,
                    _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
        }

        return _escapedModel;
    }

    @Override
    public Object clone() {
        PhieuThongTinVeNguoiCoTienAnImpl phieuThongTinVeNguoiCoTienAnImpl = new PhieuThongTinVeNguoiCoTienAnImpl();

        phieuThongTinVeNguoiCoTienAnImpl.setPhieuThongTinVeNguoiCoTienAnId(getPhieuThongTinVeNguoiCoTienAnId());
        phieuThongTinVeNguoiCoTienAnImpl.setUserId(getUserId());
        phieuThongTinVeNguoiCoTienAnImpl.setUserName(getUserName());
        phieuThongTinVeNguoiCoTienAnImpl.setCreateDate(getCreateDate());
        phieuThongTinVeNguoiCoTienAnImpl.setModifiedDate(getModifiedDate());
        phieuThongTinVeNguoiCoTienAnImpl.setTienAnId(getTienAnId());
        phieuThongTinVeNguoiCoTienAnImpl.setMaSoHoSoTienAnTuToaAn(getMaSoHoSoTienAnTuToaAn());
        phieuThongTinVeNguoiCoTienAnImpl.setNguoiTrichLuc(getNguoiTrichLuc());
        phieuThongTinVeNguoiCoTienAnImpl.setThamPhan(getThamPhan());
        phieuThongTinVeNguoiCoTienAnImpl.setSoDinhDanhCaNhan(getSoDinhDanhCaNhan());
        phieuThongTinVeNguoiCoTienAnImpl.setChuThich(getChuThich());
        phieuThongTinVeNguoiCoTienAnImpl.setNoiTamTruDiaChi(getNoiTamTruDiaChi());
        phieuThongTinVeNguoiCoTienAnImpl.setNoiTamTruTinhId(getNoiTamTruTinhId());
        phieuThongTinVeNguoiCoTienAnImpl.setNoiTamTruQuanHuyenId(getNoiTamTruQuanHuyenId());
        phieuThongTinVeNguoiCoTienAnImpl.setNoiTamTruPhuongXaId(getNoiTamTruPhuongXaId());
        phieuThongTinVeNguoiCoTienAnImpl.setNoiThuongTruDiaChi(getNoiThuongTruDiaChi());
        phieuThongTinVeNguoiCoTienAnImpl.setNoiThuongTruTinhId(getNoiThuongTruTinhId());
        phieuThongTinVeNguoiCoTienAnImpl.setNoiThuongTruQuanHuyenId(getNoiThuongTruQuanHuyenId());
        phieuThongTinVeNguoiCoTienAnImpl.setNoiThuongTruPhuongXaId(getNoiThuongTruPhuongXaId());
        phieuThongTinVeNguoiCoTienAnImpl.setHoTenVoHoacChong(getHoTenVoHoacChong());
        phieuThongTinVeNguoiCoTienAnImpl.setHoTenCha(getHoTenCha());
        phieuThongTinVeNguoiCoTienAnImpl.setHoTenMe(getHoTenMe());

        phieuThongTinVeNguoiCoTienAnImpl.resetOriginalValues();

        return phieuThongTinVeNguoiCoTienAnImpl;
    }

    @Override
    public int compareTo(
        PhieuThongTinVeNguoiCoTienAn phieuThongTinVeNguoiCoTienAn) {
        int value = 0;

        value = DateUtil.compareTo(getCreateDate(),
                phieuThongTinVeNguoiCoTienAn.getCreateDate());

        value = value * -1;

        if (value != 0) {
            return value;
        }

        return 0;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof PhieuThongTinVeNguoiCoTienAn)) {
            return false;
        }

        PhieuThongTinVeNguoiCoTienAn phieuThongTinVeNguoiCoTienAn = (PhieuThongTinVeNguoiCoTienAn) obj;

        long primaryKey = phieuThongTinVeNguoiCoTienAn.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return (int) getPrimaryKey();
    }

    @Override
    public void resetOriginalValues() {
        PhieuThongTinVeNguoiCoTienAnModelImpl phieuThongTinVeNguoiCoTienAnModelImpl =
            this;

        phieuThongTinVeNguoiCoTienAnModelImpl._originalTienAnId = phieuThongTinVeNguoiCoTienAnModelImpl._tienAnId;

        phieuThongTinVeNguoiCoTienAnModelImpl._setOriginalTienAnId = false;

        phieuThongTinVeNguoiCoTienAnModelImpl._originalMaSoHoSoTienAnTuToaAn = phieuThongTinVeNguoiCoTienAnModelImpl._maSoHoSoTienAnTuToaAn;

        phieuThongTinVeNguoiCoTienAnModelImpl._originalSoDinhDanhCaNhan = phieuThongTinVeNguoiCoTienAnModelImpl._soDinhDanhCaNhan;

        phieuThongTinVeNguoiCoTienAnModelImpl._originalNoiThuongTruDiaChi = phieuThongTinVeNguoiCoTienAnModelImpl._noiThuongTruDiaChi;

        phieuThongTinVeNguoiCoTienAnModelImpl._originalNoiThuongTruTinhId = phieuThongTinVeNguoiCoTienAnModelImpl._noiThuongTruTinhId;

        phieuThongTinVeNguoiCoTienAnModelImpl._setOriginalNoiThuongTruTinhId = false;

        phieuThongTinVeNguoiCoTienAnModelImpl._originalNoiThuongTruQuanHuyenId = phieuThongTinVeNguoiCoTienAnModelImpl._noiThuongTruQuanHuyenId;

        phieuThongTinVeNguoiCoTienAnModelImpl._setOriginalNoiThuongTruQuanHuyenId = false;

        phieuThongTinVeNguoiCoTienAnModelImpl._originalNoiThuongTruPhuongXaId = phieuThongTinVeNguoiCoTienAnModelImpl._noiThuongTruPhuongXaId;

        phieuThongTinVeNguoiCoTienAnModelImpl._setOriginalNoiThuongTruPhuongXaId = false;

        phieuThongTinVeNguoiCoTienAnModelImpl._columnBitmask = 0;
    }

    @Override
    public CacheModel<PhieuThongTinVeNguoiCoTienAn> toCacheModel() {
        PhieuThongTinVeNguoiCoTienAnCacheModel phieuThongTinVeNguoiCoTienAnCacheModel =
            new PhieuThongTinVeNguoiCoTienAnCacheModel();

        phieuThongTinVeNguoiCoTienAnCacheModel.phieuThongTinVeNguoiCoTienAnId = getPhieuThongTinVeNguoiCoTienAnId();

        phieuThongTinVeNguoiCoTienAnCacheModel.userId = getUserId();

        phieuThongTinVeNguoiCoTienAnCacheModel.userName = getUserName();

        String userName = phieuThongTinVeNguoiCoTienAnCacheModel.userName;

        if ((userName != null) && (userName.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.userName = null;
        }

        Date createDate = getCreateDate();

        if (createDate != null) {
            phieuThongTinVeNguoiCoTienAnCacheModel.createDate = createDate.getTime();
        } else {
            phieuThongTinVeNguoiCoTienAnCacheModel.createDate = Long.MIN_VALUE;
        }

        Date modifiedDate = getModifiedDate();

        if (modifiedDate != null) {
            phieuThongTinVeNguoiCoTienAnCacheModel.modifiedDate = modifiedDate.getTime();
        } else {
            phieuThongTinVeNguoiCoTienAnCacheModel.modifiedDate = Long.MIN_VALUE;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.tienAnId = getTienAnId();

        phieuThongTinVeNguoiCoTienAnCacheModel.maSoHoSoTienAnTuToaAn = getMaSoHoSoTienAnTuToaAn();

        String maSoHoSoTienAnTuToaAn = phieuThongTinVeNguoiCoTienAnCacheModel.maSoHoSoTienAnTuToaAn;

        if ((maSoHoSoTienAnTuToaAn != null) &&
                (maSoHoSoTienAnTuToaAn.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.maSoHoSoTienAnTuToaAn = null;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.nguoiTrichLuc = getNguoiTrichLuc();

        String nguoiTrichLuc = phieuThongTinVeNguoiCoTienAnCacheModel.nguoiTrichLuc;

        if ((nguoiTrichLuc != null) && (nguoiTrichLuc.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.nguoiTrichLuc = null;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.thamPhan = getThamPhan();

        String thamPhan = phieuThongTinVeNguoiCoTienAnCacheModel.thamPhan;

        if ((thamPhan != null) && (thamPhan.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.thamPhan = null;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.soDinhDanhCaNhan = getSoDinhDanhCaNhan();

        String soDinhDanhCaNhan = phieuThongTinVeNguoiCoTienAnCacheModel.soDinhDanhCaNhan;

        if ((soDinhDanhCaNhan != null) && (soDinhDanhCaNhan.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.soDinhDanhCaNhan = null;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.chuThich = getChuThich();

        String chuThich = phieuThongTinVeNguoiCoTienAnCacheModel.chuThich;

        if ((chuThich != null) && (chuThich.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.chuThich = null;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.noiTamTruDiaChi = getNoiTamTruDiaChi();

        String noiTamTruDiaChi = phieuThongTinVeNguoiCoTienAnCacheModel.noiTamTruDiaChi;

        if ((noiTamTruDiaChi != null) && (noiTamTruDiaChi.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.noiTamTruDiaChi = null;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.noiTamTruTinhId = getNoiTamTruTinhId();

        phieuThongTinVeNguoiCoTienAnCacheModel.noiTamTruQuanHuyenId = getNoiTamTruQuanHuyenId();

        phieuThongTinVeNguoiCoTienAnCacheModel.noiTamTruPhuongXaId = getNoiTamTruPhuongXaId();

        phieuThongTinVeNguoiCoTienAnCacheModel.noiThuongTruDiaChi = getNoiThuongTruDiaChi();

        String noiThuongTruDiaChi = phieuThongTinVeNguoiCoTienAnCacheModel.noiThuongTruDiaChi;

        if ((noiThuongTruDiaChi != null) && (noiThuongTruDiaChi.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.noiThuongTruDiaChi = null;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.noiThuongTruTinhId = getNoiThuongTruTinhId();

        phieuThongTinVeNguoiCoTienAnCacheModel.noiThuongTruQuanHuyenId = getNoiThuongTruQuanHuyenId();

        phieuThongTinVeNguoiCoTienAnCacheModel.noiThuongTruPhuongXaId = getNoiThuongTruPhuongXaId();

        phieuThongTinVeNguoiCoTienAnCacheModel.hoTenVoHoacChong = getHoTenVoHoacChong();

        String hoTenVoHoacChong = phieuThongTinVeNguoiCoTienAnCacheModel.hoTenVoHoacChong;

        if ((hoTenVoHoacChong != null) && (hoTenVoHoacChong.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.hoTenVoHoacChong = null;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.hoTenCha = getHoTenCha();

        String hoTenCha = phieuThongTinVeNguoiCoTienAnCacheModel.hoTenCha;

        if ((hoTenCha != null) && (hoTenCha.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.hoTenCha = null;
        }

        phieuThongTinVeNguoiCoTienAnCacheModel.hoTenMe = getHoTenMe();

        String hoTenMe = phieuThongTinVeNguoiCoTienAnCacheModel.hoTenMe;

        if ((hoTenMe != null) && (hoTenMe.length() == 0)) {
            phieuThongTinVeNguoiCoTienAnCacheModel.hoTenMe = null;
        }

        return phieuThongTinVeNguoiCoTienAnCacheModel;
    }

    @Override
    public String toString() {
        StringBundler sb = new StringBundler(45);

        sb.append("{phieuThongTinVeNguoiCoTienAnId=");
        sb.append(getPhieuThongTinVeNguoiCoTienAnId());
        sb.append(", userId=");
        sb.append(getUserId());
        sb.append(", userName=");
        sb.append(getUserName());
        sb.append(", createDate=");
        sb.append(getCreateDate());
        sb.append(", modifiedDate=");
        sb.append(getModifiedDate());
        sb.append(", tienAnId=");
        sb.append(getTienAnId());
        sb.append(", maSoHoSoTienAnTuToaAn=");
        sb.append(getMaSoHoSoTienAnTuToaAn());
        sb.append(", nguoiTrichLuc=");
        sb.append(getNguoiTrichLuc());
        sb.append(", thamPhan=");
        sb.append(getThamPhan());
        sb.append(", soDinhDanhCaNhan=");
        sb.append(getSoDinhDanhCaNhan());
        sb.append(", chuThich=");
        sb.append(getChuThich());
        sb.append(", noiTamTruDiaChi=");
        sb.append(getNoiTamTruDiaChi());
        sb.append(", noiTamTruTinhId=");
        sb.append(getNoiTamTruTinhId());
        sb.append(", noiTamTruQuanHuyenId=");
        sb.append(getNoiTamTruQuanHuyenId());
        sb.append(", noiTamTruPhuongXaId=");
        sb.append(getNoiTamTruPhuongXaId());
        sb.append(", noiThuongTruDiaChi=");
        sb.append(getNoiThuongTruDiaChi());
        sb.append(", noiThuongTruTinhId=");
        sb.append(getNoiThuongTruTinhId());
        sb.append(", noiThuongTruQuanHuyenId=");
        sb.append(getNoiThuongTruQuanHuyenId());
        sb.append(", noiThuongTruPhuongXaId=");
        sb.append(getNoiThuongTruPhuongXaId());
        sb.append(", hoTenVoHoacChong=");
        sb.append(getHoTenVoHoacChong());
        sb.append(", hoTenCha=");
        sb.append(getHoTenCha());
        sb.append(", hoTenMe=");
        sb.append(getHoTenMe());
        sb.append("}");

        return sb.toString();
    }

    @Override
    public String toXmlString() {
        StringBundler sb = new StringBundler(70);

        sb.append("<model><model-name>");
        sb.append("qldc.pm.tienan.model.PhieuThongTinVeNguoiCoTienAn");
        sb.append("</model-name>");

        sb.append(
            "<column><column-name>phieuThongTinVeNguoiCoTienAnId</column-name><column-value><![CDATA[");
        sb.append(getPhieuThongTinVeNguoiCoTienAnId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>userId</column-name><column-value><![CDATA[");
        sb.append(getUserId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>userName</column-name><column-value><![CDATA[");
        sb.append(getUserName());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>createDate</column-name><column-value><![CDATA[");
        sb.append(getCreateDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
        sb.append(getModifiedDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>tienAnId</column-name><column-value><![CDATA[");
        sb.append(getTienAnId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>maSoHoSoTienAnTuToaAn</column-name><column-value><![CDATA[");
        sb.append(getMaSoHoSoTienAnTuToaAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>nguoiTrichLuc</column-name><column-value><![CDATA[");
        sb.append(getNguoiTrichLuc());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>thamPhan</column-name><column-value><![CDATA[");
        sb.append(getThamPhan());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>soDinhDanhCaNhan</column-name><column-value><![CDATA[");
        sb.append(getSoDinhDanhCaNhan());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>chuThich</column-name><column-value><![CDATA[");
        sb.append(getChuThich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>noiTamTruDiaChi</column-name><column-value><![CDATA[");
        sb.append(getNoiTamTruDiaChi());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>noiTamTruTinhId</column-name><column-value><![CDATA[");
        sb.append(getNoiTamTruTinhId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>noiTamTruQuanHuyenId</column-name><column-value><![CDATA[");
        sb.append(getNoiTamTruQuanHuyenId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>noiTamTruPhuongXaId</column-name><column-value><![CDATA[");
        sb.append(getNoiTamTruPhuongXaId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>noiThuongTruDiaChi</column-name><column-value><![CDATA[");
        sb.append(getNoiThuongTruDiaChi());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>noiThuongTruTinhId</column-name><column-value><![CDATA[");
        sb.append(getNoiThuongTruTinhId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>noiThuongTruQuanHuyenId</column-name><column-value><![CDATA[");
        sb.append(getNoiThuongTruQuanHuyenId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>noiThuongTruPhuongXaId</column-name><column-value><![CDATA[");
        sb.append(getNoiThuongTruPhuongXaId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hoTenVoHoacChong</column-name><column-value><![CDATA[");
        sb.append(getHoTenVoHoacChong());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hoTenCha</column-name><column-value><![CDATA[");
        sb.append(getHoTenCha());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hoTenMe</column-name><column-value><![CDATA[");
        sb.append(getHoTenMe());
        sb.append("]]></column-value></column>");

        sb.append("</model>");

        return sb.toString();
    }
}
